package com.hmily.dubbo.provider.spi.dubbo;

import org.apache.dubbo.common.extension.ExtensionLoader;
import org.apache.dubbo.rpc.Protocol;

/**
 * <h1>测试dubbo spi。</h1>
 *
 * @author hmilyylimh
 * ^_^
 * @version 0.0.1
 * ^_^
 * @date 2021-11-13
 */
public class TestDubboSpiAction {

    public static void main(String[] args) {
        ExtensionLoader<Protocol> loader = ExtensionLoader.getExtensionLoader(Protocol.class);
        Protocol customProtocol = loader.getExtension("customProtocol");
        System.out.println(customProtocol.getDefaultPort());
    }
}